<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
		<canvas id ="canvas" width="500" height="500" style="border:1px solid #000"></canvas>

</body>
</html>

<script type="text/javascript">
	var canvas = document.getElementById('canvas');
	var context = canvas.getContext('2d');
	context.fillText("hell world",40,40);

	context.textBaseline="bottom";
	context.moveTo(0,100);
	context.lineTo(250,100);
	context.stoke();
	context.font = '30px Times New Roman';
	context.fillText("hello world",40,100);
	var g = context.createLinearGradient(0,0,200,0);
	g.addColorStop(0,'red');
	g.addColorStop(0.5,'green');
	g.addColorStop(1,'blue');
	context.fillStyle = g;
	context.fillText("Big Smile!",40,150)

	context.strokeStyle =g;
	context.strokeText("Big Smile!",40,200)

	</script>